package com.example.demo.mapper;

import com.example.demo.model.ArticleInfo;
import com.example.demo.model.CommentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {

    int getArtCountByUid(Integer uid);

    List<ArticleInfo> getMyList(Integer uid);

    int del(@Param("id") Integer id, Integer uid);

    ArticleInfo getDetail(Integer id);

    int incrRCount(Integer id);

    int add(ArticleInfo articleInfo);

    int update(ArticleInfo articleInfo);

    List<ArticleInfo> getListByPage(Integer pSize, Integer offSize);

    int getArtCount();

    int draft(ArticleInfo articleInfo);

    List<ArticleInfo> getListDraft(Integer uid);

    List<CommentInfo> getCommentListByArtId(Integer artid);

    int upComment(CommentInfo commentInfo);
}
